/*
 * Copyright (C) 2018 Logos Technology Ltd.
 */

package com.logos.tool.location;

import com.amap.api.location.DPoint;
import com.logos.tool.map.CoordinateTransform;

/**
 * @author Young Ken
 */

public class TransformWgs84ToGcj02 implements Transform {

    @Override
    public DPoint transform(DPoint value) {
        DPoint result = new DPoint();

        double[] point = CoordinateTransform
                .transformLocationFromWgs84ToGcj02(value.getLatitude(), value.getLongitude());
        result.setLatitude(point[0]);
        result.setLongitude(point[1]);
        return result;
    }
}
